<!DOCTYPE html>
<html>
<head>
  <meta charset="UTF-8">
  <title>Document</title>
</head>
<body>
  <script>
    console.log(typeof 2);          // 输出结果：number
    console.log(typeof '2');        // 输出结果：string
    console.log(typeof true);       // 输出结果：boolean
    console.log(typeof null);       // 输出结果：object
    console.log(typeof undefined);  // 输出结果：undefined
  </script>
</body>
</html>